cmake_minimum_required(VERSION 3.16)

project (tetriz)

set(CMAKE_CXX_STANDARD 20)

add_subdirectory (src)

if(MSVC)
    target_compile_options(tetriz PRIVATE "/utf-8")
    #runtime dll /MT /MTD /MD /MDd
    set_property(TARGET tetriz PROPERTY
        MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
else()
    find_package(Threads REQUIRED)
    target_link_libraries(tetriz Threads::Threads)
endif()